﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第六十八题
//BC70 空心三角形图案
//https://www.nowcoder.com/practice/2ccc5fca423e47f0b622fe6f151cfab4?tpId=107&tqId=33351&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D2%26tpId%3D107%26type%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    int n = 0;
    while (scanf("%d", &n) != EOF) {
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (i == j || j == 0 || i == n - 1) {
                    printf("* ");
                }
                else {
                    printf("  ");
                }
            }
            printf("\n");
        }
    }
    return 0;
}